package com.web.controller;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value="/weixin/test")
public class Test {
	
	@RequestMapping(value="check" , method={RequestMethod.GET, RequestMethod.POST})
	@ResponseBody
	public String check(String signature, String timestamp, String nonce, String echostr) {
		System.out.println(signature);
		System.out.println(timestamp);
		System.out.println(nonce);
		System.out.println(echostr);
		Logger.getLogger(getClass()).error(echostr);
		
//		http://122.226.76.46/organ.htm?met=answer
//		http://114.215.195.137:8180/wxtest/test/check
		
		return echostr;
	}
}
